import turtle
import random

turtle.delay(0)
turtle.bgcolor("black")
pen = turtle.Pen()
pen.pencolor("#ffff00")
length = 30
side   = 3

# colors = ["red", "blue"]

for i in range(100):
    x = -200 + i%10  * 35
    y = +200 - i//10 * 35
    pen.up()
    pen.goto(x, y)
    pen.down()

    r = random.randrange(0, 255)
    g = random.randrange(0, 255)
    b = random.randrange(0, 255)
    color = f"#{r:02x}{g:02x}{b:02x}"
    print(color)
    pen.pencolor(color)

    for j in range(side):
        pen.left(360/side)
        pen.forward(length)

turtle.done()